#ifndef PLATFORM
#define PLATFORM

#include <string>
#include <vector>
#ifdef _WIN32
#include <Windows.h>
using namespace std;
#endif
#ifdef MAIN_EXPORT
#define XM_ENTRY __declspec(dllexport)
#else
#define XM_ENTRY __declspec(dllimport)
#endif
#ifdef MATH_EXPORT
#define XMA_ENTRY __declspec(dllexport)
#else
#define XMA_ENTRY __declspec(dllimport)
#endif
typedef unsigned int UINT;
typedef unsigned char BYTE;

#define SAFE_RELEASE(p){\
	if (p != NULL&&p->IsAutoRec()){\
		if (p->GetRef() <= 0){\
			p = NULL;\
		}\
		else if (p->GetRef() == 1){\
			p->Release();\
			p = NULL;\
		}\
		else{\
			p->Release();\
		}\
	}\
}
#endif